import SimpleXMLRPCServer
import opie

#class xmlrpcserve(SimpleXMLRPCServer):

#	a =123

class Foo:
	def func(a,b):
		return a/b

serv = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost", 8000))
def func(a,b):
	return a+b
serv.register_function(func)
serv.register_function(pow)
serv.register_instance(Foo())
serv.serve_forever()
